// 拼接HTTPUrl
function url(type, pathname) {
  return window.RPConfig[type] + pathname;
}

const userManageAPI = {
  // 新增用户
  addUser: params => {
    return $http.post(url("example", "/user/add"), params);
  },
  // 删除用户
  deleteUsers: params => {
    return $http.post(url("example", "/user/deleteById"), params);
  },
  // 编辑用户信息
  updateUser: params => {
    return $http.post(url("example", "/user/update"), params);
  },
  // 获取用户管理列表数据
  getUserListPage: param => {
    return $http.post(url("example", "/user/findUserListPage"), param).then(response => response.data);
  }
};

export default userManageAPI;
